<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <div id="fb-root"></div>
  <fb:login-button 
  scope="public_profile,email"
  onlogin="checkLoginState();">
</fb:login-button>
  <script>
    function checkLoginState() {
      FB.getLoginStatus(function (response) {
        console.log(response);
        statusChangeCallback(response);
      });
    }

    (function (d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) {
        return;
      }
      js = d.createElement(s);
      js.id = id;
      js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.11"
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));


    window.fbAsyncInit = function () {

      FB.init({
        appId: '525111244509363',
        autoLogAppEvents: true,
        status: true,
        xfbml: true,
        version: 'v2.11' // or v2.8, v2.7, v2.6, v2.5, v2.4, v2.3,
      });
      FB.AppEvents.logPageView();

    };
  </script>
</body>

</html>